import { List, Set, form, fromJS } from 'immutable';

const log = console.log.bind()

// log(dayjs())
// log(dayjs('2018-05-02'))
// log(dayjs('2018-5-2'))
// log(dayjs(1318781876406))
// window.dayjs = dayjs

// const map1 = immutable.Map({a: 1,b: 2,c: 3});
// const map2 = map1.set('b', 10)
// log(map1.get('b'))
// log(map2.get('b'))

// const map3 = {a: 1,b: 2,c: 3};
// const map4 = Object.assign({}, map3, {b: 20});
// log(map3.b)
// log(map4.b)

// const emplist = List();
// log(emplist)
// const parr = [1,2,3,4]
// const parrToIm = List(parr)
// log(parrToIm)

// const pSet = Set([1,1,2,3,4])
// const pSetToIm = List(pSet)
// log(pSet)

// log(List.isList(pSetToIm))

// log(List.of(1,12,12,3,4,5,5))
// log(List.of({a:1},{b:2},{c:3}).size)

const arr = List([1, 2, 3, 4, 5])
const arr2 = arr.delete(0).size
const arr3 = arr.set(0, 'test')
const arr4 = arr.insert(10, 'pp')
const arr5 = arr.clear()
const arr6 = arr.push(50, 60, 70)
const arr7 = arr.pop()
const arr8 = arr.unshift('pp')
const arr9 = arr.shift()
const arr10 = arr.update(0, val => val * 20)
const arr11 = arr.setSize(2)
const arr12 = arr.setIn([100, 200, 300], 'uu')
log(typeof arr12)